from bs4 import BeautifulSoup

# 多值属性
soup = BeautifulSoup('<p class="body strikeout"></p>')
print(soup.p['class'])  
print(soup.p.attrs) 